﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

using VTESCore;

using ScytheEngine;
using Microsoft.Xna.Framework.Content;

namespace VTESGameLogicWindows
{
	public class SinglePlayerGame : GameplayScreen
	{
		VTESDeck m_FNCards;
		Dictionary<VTESCard, Texture2D> m_CardToTextureDictionary = new Dictionary<VTESCard, Texture2D>();

		#region Initialization

		protected override void LoadCustomStateContent()
		{
			ContentManager decks_content = new ContentManager( GameStateManager.Game.Services, "Content\\decks" );

			m_FNCards = decks_content.Load<VTESDeck>( "mydeck" );

			// if I render all the Final Nights cards at once it drops to like 1fps! Need to investigate this...
			//foreach ( VTESCard card in m_FNCards )
			//{
			//	StateScene.AddObject( new CardObject( card ) );
			//}

			// for now lets just add one card
			StateScene.AddObject( new HandArea() );
			StateScene.AddObject( new CardObject( m_FNCards.Find( "Zombie" ) ) );
		}

		#endregion

		#region Update and Draw

		#endregion

		#region Handle Input
		/// <summary>
		/// Lets the game respond to player input. Unlike the Update method,
		/// this will only be called when the gameplay screen is active.
		/// </summary>
		public override void HandleInput( InputState input )
		{
			if ( input == null )
				throw new ArgumentNullException( "input" );

			if ( input.PauseGame )
			{
				// If they pressed pause, bring up the pause menu screen.
				GameStateManager.AddState( GameStateManager.GetSpecialScreen( ScreenType.GamePausedScreen ) );
			}
		}	
		#endregion
	}
}
